import request from '@/config/axios'

// 排行 API
export const StatisticsRankApi = {
  // 外呼总量排行
  getCallCountRank: (params: any) => {
    return request.get({
      url: '/call/statistics-rank/get-call-count-rank',
      params
    })
  },
  // 接通数量排行
  getSuccessCountRank: (params: any) => {
    return request.get({
      url: '/call/statistics-rank/get-success-count-rank',
      params
    })
  },
  // 通话时长排行
  getCallSecondRank: (params: any) => {
    return request.get({
      url: '/call/statistics-rank/get-call-second-rank',
      params
    })
  },
  // 数据报表
  getStatList: (params: any) => {

    return request.get({
      url: '/call/stat/list',
      params
    })
  },
  // 数据报表导出
  exportStatePage: async (params) => {
    return await request.download({ url: `/call/stat/export-excel`, params })
  },
  // 坐席数据报表
  getStatOwner: (params: any) => {
    return request.get({
      url: '/call/stat/owner',
      params
    })
  },
  // 坐席数据报表导出
  exportStatOwner: async (params) => {
    return await request.download({ url: `/call/stat/owner-export-excel`, params })
  },
  // 渠道排行
  getCallChannelRank: (params: any) => {
    return request.get({
      url: '/call/statistics-rank/get-call-channel-rank',
      params
    })

  }

}
